package com.literature.search.core.utils;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;

/**
 * @ClassName LocalDateTimeConvertUtil
 * @Description TODO
 * @Author abin
 * @Date 2023/3/25 10:08
 * @Version 1.0
 */
public class LocalDateTimeConvertUtil {
    public static LocalDateTime getDateTimeOfTimestamp(long timestamp) {
        Instant instant = Instant.ofEpochMilli(timestamp);
        ZoneId zone = ZoneId.systemDefault();
        return LocalDateTime.ofInstant(instant, zone);
    }
}
